<html><head><meta charset="gb2312"/><title>SoundPlugin.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Sound example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) 2003 - Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<b><font color="#3A3966">If</font></b> <font color="#3A3966">InitSound</font>() = 0
<font color="#3A3966">  MessageRequester</font>("Error", "Can't open DirectX 7 or no sound card is available",  0)
  <b><font color="#3A3966">End</font></b>
<b><font color="#3A3966">EndIf</font></b>

<font color="#3A3966">UseOGGSoundDecoder</font>()

SoundFileName$ =<font color="#3A3966"> OpenFileRequester</font>("Choose a sound file", "", "Wave or OGG files|*.wav;*.ogg",0)
<b><font color="#3A3966">If</font></b> SoundFileName$
  <b><font color="#3A3966">If</font></b> <font color="#3A3966">LoadSound</font>(0, SoundFileName$)
<font color="#3A3966">    PlaySound</font>(0,<font color="#FF0000">#PB_Sound_Loop</font>)
<font color="#3A3966">    MessageRequester</font>("Sound", "Playing the sound (loop)..."+<font color="#3A3966">Chr</font>(10)+"Click to quit..", 0)
  <b><font color="#3A3966">Else</font></b>
<font color="#3A3966">    MessageRequester</font>("Error", "Can't load the sound.", 0)
  <b><font color="#3A3966">EndIf</font></b>
<b><font color="#3A3966">EndIf</font></b>
<b><font color="#3A3966">End</font></b>   </font></pre>
</body></html>
